package com.simple.datax.db.mybatis.model;

import java.io.Serializable;
import java.util.Date;

import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 
 * @author paladin
 *
 */
public class DataxReceiveChannel implements Serializable {
    private Long id;

    private String channelDesc;

    private String communType;

    private String communParam;

    private Short flag;

    private Date time;

    private Short group;

    private String msgFormat;

    private String msgCharset;

    private String msgType;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getChannelDesc() {
        return channelDesc;
    }

    public void setChannelDesc(String channelDesc) {
        this.channelDesc = channelDesc == null ? null : channelDesc.trim();
    }

    public String getCommunType() {
        return communType;
    }

    public void setCommunType(String communType) {
        this.communType = communType == null ? null : communType.trim();
    }

    public String getCommunParam() {
        return communParam;
    }

    public void setCommunParam(String communParam) {
        this.communParam = communParam == null ? null : communParam.trim();
    }

    public Short getFlag() {
        return flag;
    }

    public void setFlag(Short flag) {
        this.flag = flag;
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    public Short getGroup() {
        return group;
    }

    public void setGroup(Short group) {
        this.group = group;
    }

    public String getMsgFormat() {
        return msgFormat;
    }

    public void setMsgFormat(String msgFormat) {
        this.msgFormat = msgFormat == null ? null : msgFormat.trim();
    }

    public String getMsgCharset() {
        return msgCharset;
    }

    public void setMsgCharset(String msgCharset) {
        this.msgCharset = msgCharset == null ? null : msgCharset.trim();
    }

    public String getMsgType() {
        return msgType;
    }

    public void setMsgType(String msgType) {
        this.msgType = msgType == null ? null : msgType.trim();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DataxReceiveChannel other = (DataxReceiveChannel) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getChannelDesc() == null ? other.getChannelDesc() == null : this.getChannelDesc().equals(other.getChannelDesc()))
            && (this.getCommunType() == null ? other.getCommunType() == null : this.getCommunType().equals(other.getCommunType()))
            && (this.getCommunParam() == null ? other.getCommunParam() == null : this.getCommunParam().equals(other.getCommunParam()))
            && (this.getFlag() == null ? other.getFlag() == null : this.getFlag().equals(other.getFlag()))
            && (this.getTime() == null ? other.getTime() == null : this.getTime().equals(other.getTime()))
            && (this.getGroup() == null ? other.getGroup() == null : this.getGroup().equals(other.getGroup()))
            && (this.getMsgFormat() == null ? other.getMsgFormat() == null : this.getMsgFormat().equals(other.getMsgFormat()))
            && (this.getMsgCharset() == null ? other.getMsgCharset() == null : this.getMsgCharset().equals(other.getMsgCharset()))
            && (this.getMsgType() == null ? other.getMsgType() == null : this.getMsgType().equals(other.getMsgType()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getChannelDesc() == null) ? 0 : getChannelDesc().hashCode());
        result = prime * result + ((getCommunType() == null) ? 0 : getCommunType().hashCode());
        result = prime * result + ((getCommunParam() == null) ? 0 : getCommunParam().hashCode());
        result = prime * result + ((getFlag() == null) ? 0 : getFlag().hashCode());
        result = prime * result + ((getTime() == null) ? 0 : getTime().hashCode());
        result = prime * result + ((getGroup() == null) ? 0 : getGroup().hashCode());
        result = prime * result + ((getMsgFormat() == null) ? 0 : getMsgFormat().hashCode());
        result = prime * result + ((getMsgCharset() == null) ? 0 : getMsgCharset().hashCode());
        result = prime * result + ((getMsgType() == null) ? 0 : getMsgType().hashCode());
        return result;
    }
    
    public String toString() {
		return ReflectionToStringBuilder.toString(this,
				ToStringStyle.SHORT_PREFIX_STYLE);
	}
}